---
title: Retrieve payroll classification detail
summary: Loads manual-classification/payroll detail lines for a policy period, selecting between a PMS-era and WCIS-era SQL statement.
status: draft
owner: SAIF Claims BOF team
last_reviewed: 2026-08-21
library: SAIF.Business.View.Policy
reference_type: embedded
operation_id: OP-VP-004
trigger: Caller supplies ClassCoverageSetID or PremiumSetID + date range via Criteria
---

# Retrieve payroll classification detail

Loads a collection of `clsPayrollClassInfo` rows used by the Legal front end to display
business-classification and payroll context for a policy period, selecting the correct era-specific
query based on which identifier is supplied.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-VP-004 |
| **Trigger** | Caller supplies a `ClassCoverageSetID` (PMS-era) or a `PremiumSetID` + date range (WCIS-era) via the `Criteria` |
| **Inputs** | `ClassCoverageSetID`, or `PremiumSetID` + `PeriodStartDate`/`PeriodEndDate` |
| **Outputs** | Collection of `clsPayrollClassInfo` |
| **Primary components** | `clsPayrollClassInfoCollection`, `clsPayrollClassInfo.RETRIEVE_PMS_SQL`, `clsPayrollClassInfo.RETRIEVE_WCIS_SQL` |
| **Entry point** | `SAIF.Business.View.Policy\clsPayrollClassInfoCollection.vb` |

## Steps

1. Caller supplies either a `ClassCoverageSetID` (PMS-era) or a `PremiumSetID` + date range
   (WCIS-era) via the `Criteria`.
2. `Criteria.RetrieveSQL` branches:
   - If `ClassCoverageSetID` is supplied: returns `clsPayrollClassInfo.RETRIEVE_PMS_SQL`
     ([SQL-VP-030](../sql/SQL-030-retrieve_pms_sql.md)) — an inline Oracle `SELECT` against
     [PPNW_CLASS_COVERAGE_DETAIL](../database-tables.md#ppnw_class_coverage_detail),
     [MANUAL_CLASS_DESCRIPTION](../database-tables.md#manual_class_description), and
     [POLICY_PERIOD_NON_WCIS](../database-tables.md#policy_period_non_wcis).
   - Otherwise: returns `clsPayrollClassInfo.RETRIEVE_WCIS_SQL`
     ([SQL-VP-031](../sql/SQL-031-retrieve_wcis_sql.md)) — an inline Oracle `SELECT` (`UNION` of a
     "with federal minimum wage" branch and a fallback branch) against
     [PREM_HIST_CLASS_COVERAGE](../database-tables.md#prem_hist_class_coverage),
     [MANUAL_CLASS_DESCRIPTION](../database-tables.md#manual_class_description),
     [PREM_HIST_ADJ_RATE_CLASS](../database-tables.md#prem_hist_adj_rate_class),
     [POLICY_PERIOD](../database-tables.md#policy_period), [LOCATION](../database-tables.md#location),
     and [FEDERAL_MINIMUM_WAGE](../database-tables.md#federal_minimum_wage).
3. `AfterRetrieve` iterates the `clsResultSet` and creates one `clsPayrollClassInfo` per row via
   `Load`/`Fill`.
4. Outcome: a collection of payroll/classification lines used by the Legal front end to display
   business-classification and payroll context for a policy period.

## Process flow

```mermaid
flowchart TD
	Start([Criteria supplied]) --> Branch{ClassCoverageSetID supplied?}
	Branch -->|Yes| PMS[Execute SQL-VP-030 PMS-era query]
	Branch -->|No| WCIS[Execute SQL-VP-031 WCIS-era query]
	PMS --> Fill[AfterRetrieve creates clsPayrollClassInfo per row]
	WCIS --> Fill
	Fill --> EndOk([Collection of clsPayrollClassInfo returned])
```

## Failure and edge-case behavior
- No documented explicit error handling beyond the standard collection-retrieve lifecycle was found for this operation in the analyzed source.*

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- `SAIF.Business.View.Policy\clsPayrollClassInfo.vb`
- `SAIF.Business.View.Policy\clsPayrollClassInfoCollection.vb`
